import request from '@/utils/request'

// 查询产品预排产计划总列表
export function listProductPreSchedulingPlanMain(query) {
  return request({
    url: '/sales/productPreSchedulingPlanMain/list',
    method: 'get',
    params: query
  })
}

// 查询产品预排产计划总详细
export function getProductPreSchedulingPlanMain(id) {
  return request({
    url: '/sales/productPreSchedulingPlanMain/' + id,
    method: 'get'
  })
}

// 新增产品预排产计划总
export function addProductPreSchedulingPlanMain(data) {
  return request({
    url: '/sales/productPreSchedulingPlanMain',
    method: 'post',
    data: data
  })
}

// 修改产品预排产计划总
export function updateProductPreSchedulingPlanMain(data) {
  return request({
    url: '/sales/productPreSchedulingPlanMain',
    method: 'put',
    data: data
  })
}

// 删除产品预排产计划总
export function delProductPreSchedulingPlanMain(id) {
  return request({
    url: '/sales/productPreSchedulingPlanMain/' + id,
    method: 'delete'
  })
}

export function auditProduct(id) {
  return request({
    url: '/sales/productPreSchedulingPlanMain/auditProduct/' + id,
    method: 'get',
    timeout:30000
  })
}
